package tech.aistar.corejava.day12;

import java.util.TreeSet;

/**
 * @Author: lya
 * @Description: 本类的作用描述:
 * @CreateDate: 2019/7/30
 * @Version: 1.0
 */
public class TreeSetDemo {
    public static void main(String[] args) {
        Book b1 = new Book(1, "了不起的盖茨比", "忘了", 20.0);
        Book b2 = new Book(2, "刀锋", "毛姆", 35.0);
        Book b3 = new Book(3, "鬼吹灯", "天下霸唱", 296.0);
        Book b4 = new Book(4, "盗墓笔记", "南派三叔", 329.0);

        TreeSet<Book> books = new TreeSet<>();
        books.add(b1);
        books.add(b2);
        books.add(b3);
        books.add(b4);

        books.forEach(System.out::println);
    }
}
